/*
 *  Copyright 2019-2020
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.qp.basics.common.annotation;

import io.swagger.annotations.ApiModelProperty;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author
 * @date 2019-6-4 13:52:30
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FiledColumnInfo {

    @ApiModelProperty(value = "数据库表名称")
    String tableName() default "";

    @ApiModelProperty(value = "数据库字段名称")
    String columnName() default "";

    @ApiModelProperty(value = "数据库字段类型")
    String columnType() default "";

    @ApiModelProperty(value = "数据库字段键类型")
    String keyType() default "";

    @ApiModelProperty(value = "字段额外的参数")
    String extra() default "";

    @ApiModelProperty(value = "数据库字段描述")
    String remark() default "";

    @ApiModelProperty(value = "是否必填")
    boolean notNull() default false;

    @ApiModelProperty(value = "是否在列表显示")
    boolean listShow() default true;

    @ApiModelProperty(value = "是否表单显示")
    boolean formShow() default true;

    /**
     * 编辑框类型。
     * Textarea,Select,Radio,datetime
     * @return
     */
    @ApiModelProperty(value = "表单类型",notes="Image,Attachment,TableSelect,Textarea,Select,Radio,datetime")
    String formType() default "";

    @ApiModelProperty(value = "查询 1:模糊 2：精确")
    String queryType() default "";

    @ApiModelProperty(value = "字典名称")
    String dictName() default "";

    @ApiModelProperty(value = "日期注解")
    String dateAnnotation() default "";

    @ApiModelProperty(value = "外键表")
    String fkTitleColName() default "";

}

